#ifndef CLIENT_TRANSFER_SESSION_H
#define CLIENT_TRANSFER_SESSION_H

#include "Common.h"
#include "type.h"
#include "FileDriver.h"
#include "FileBuffer.h"

class ClientTransferSession
{
public:
	ClientTransferSession(in_addr_t local_addr,
			   	   	   	  in_port_t local_port);
	virtual ~ClientTransferSession() = 0;
	virtual void wait_for_recv() = 0;
	virtual int send_data(string filename,
			      	 string remote_addr,
			      	 int remote_port) = 0;

protected:
	virtual int recv_data(string filename) = 0;

protected:
	in_addr_t m_local_addr;
	in_port_t m_local_port;
	struct sockaddr_in m_server_addr;
	int m_listen_socket;
	FileDriver m_file_driver;
	FileBuffer m_file_buffer;
};

#endif
